export const isElectron = () => {
    // Renderer process check
    if (typeof window !== 'undefined' && 
        typeof (window as any).process === 'object' &&
        (window.process as any).type === 'renderer') {
      return true;
    }
  
    // Main process check
    if (typeof process !== 'undefined' &&
        typeof process.versions === 'object' &&
        !!process.versions.electron) {
      return true;
    }
  
    // UserAgent check
    if (typeof navigator === 'object' && 
        navigator.userAgent.indexOf('Electron') >= 0) {
      return true;
    }
  
    return false;
  };